<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>usersearchbook</title>
<link rel="stylesheet" type="text/css" href="styles/common.css">
</head>
<body>
  <div id="" class="nav">
  	<a href="user">借阅信息</a>
  	<a class="navactive" href="usersearchbook">检索图书</a>
	  <p>用户名：{{$UserInfo['username']}} 学号：{{$UserInfo['userid']}}</p>
  </div>
  <form class="search" method="get" action="">
    <input type="text" name="bookname">
    <input type="submit" value="search">
  </form>
	<table class="tab" id="">
		<tbody>
  			<tr>
    	 		<th>书的id</th>
     	 		<th>书的名字</th>
     	 		<th>作者</th>
     	 		<th>书的出版社</th>
      			<th>图书状态</th>
      			<th>操作</th>
    		</tr>
			@foreach($bookInfo as $key => $value)
			<tr>
    			<td>{{$value['bookid']}}</td>
		     	<td>《{{$value['bookname']}}》</td>
			    <td>{{$value['author']}}</td>
			    <td>{{$value['press']}}</td>
      			<td>@if($value['status'] == 0)已借出@else在架可借@endif</td>
      			<td>
					<a class="borrow" value="{{$value['bookid']}}">@if($value['status'] == 0) @else借书@endif</a>
				</td>
   			</tr>
			@endforeach
		</tbody>
	</table>
</body>
<script src="script/jquery-3.1.1.min.js"></script>
<script src="script/usersearchbook.js"></script>
</html>